//
//  EvaluationViewController.m
//  WheatPlan
//
//  Created by giantumbrella on 15/5/21.
//  Copyright (c) 2015年 IOSTeam. All rights reserved.
//

#import "EvaluationViewController.h"
#import "CommonMacro.h"
@interface EvaluationViewController ()

@end

@implementation EvaluationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    
    //设置导航栏头文字
    self.navigationItem.title = @"测评";
    //设置导航栏背景颜色
    [self.navigationController.navigationBar setBarTintColor:UIColorWithRGBA(0,215,226,1)];
    //设置导航栏字体颜色
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],UITextAttributeTextColor,nil]];
    
    _evaluationTableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) style:UITableViewStylePlain];
    _evaluationTableView.delegate = self;
    _evaluationTableView.dataSource = self;
    _evaluationTableView.rowHeight = 50;
    
    [self.view addSubview:_evaluationTableView];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark--- tableViewDelegate 每个区的行数
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    if (section==0) {
        return 4;
        
    }else{
        
        return 3;
    }
}

#pragma mark--- tableViewDelegate 区尾的高度

-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    if (section == 2) {
        return 0;
    }
    return 27;
    
}
#pragma mark--- tableViewDelegate cell

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    static NSString *NOTIFY = @"cell";
    UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:NOTIFY];
    if (cell==nil) {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NOTIFY];
        
    }
    
    if (indexPath.section == 0 ) {
        
        if (indexPath.row == 0) {
            cell.textLabel.text = @"   成长测评";
            cell.textLabel.textColor = [UIColor grayColor];
            cell.textLabel.font = [UIFont systemFontOfSize:16];
            UILabel * lab = [[UILabel alloc]initWithFrame:CGRectMake(120, 0, 200, 50)];
            lab.textColor = [UIColor grayColor];
            lab.text = @"（深入了解你的宝宝）";
            cell.userInteractionEnabled = NO;
            [cell addSubview:lab];
        } else if(indexPath.row ==1)
        {
            cell.textLabel.text = @"  敏感期捕捉";
            cell.textLabel.font = [UIFont systemFontOfSize:20];
            
            
        }else if (indexPath.row ==2){
            
            cell.textLabel.text = @"  感官统合测评";
            cell.textLabel.font = [UIFont systemFontOfSize:20];
            
        }else{
            
            cell.textLabel.text = @"  智能领域发现";
            cell.textLabel.font = [UIFont systemFontOfSize:20];
            
        }
        
        
    }
    if(indexPath.section == 1){
        
        if (indexPath.row == 0) {
            cell.textLabel.text = @"   成长报告";
            cell.textLabel.textColor = [UIColor grayColor];
            cell.textLabel.font = [UIFont systemFontOfSize:16];
            UILabel * lab = [[UILabel alloc]initWithFrame:CGRectMake(120, 0, 200, 50)];
            lab.textColor = [UIColor grayColor];
            lab.text = @"（宝宝成长评测报告）";
            cell.userInteractionEnabled = NO;
            
            [cell addSubview:lab];
        } else if(indexPath.row ==1)
        {
            cell.textLabel.text = @"  家长评测报告";
            cell.textLabel.font = [UIFont systemFontOfSize:20];
            
            
        }else if (indexPath.row ==2){
            
            cell.textLabel.text = @"  孩子成长报告";
            cell.textLabel.font = [UIFont systemFontOfSize:20];
            
        }    }
    if (indexPath.section == 2) {
        if (indexPath.row == 0) {
            cell.textLabel.text = @"   报告解读";
            cell.textLabel.textColor = [UIColor grayColor];
            cell.textLabel.font = [UIFont systemFontOfSize:16];
            UILabel * lab = [[UILabel alloc]initWithFrame:CGRectMake(120, 0, 200, 50)];
            lab.textColor = [UIColor grayColor];
            lab.text = @"（专家解读成长评测报告）";
            cell.userInteractionEnabled = NO;
            
            [cell addSubview:lab];
        } else if(indexPath.row ==1)
        {
            cell.textLabel.text = @"  同城解读";
            cell.textLabel.font = [UIFont systemFontOfSize:20];
            
            
        }else if (indexPath.row ==2){
            
            cell.textLabel.text = @"  上门解读";
            cell.textLabel.font = [UIFont systemFontOfSize:20];
            cell.textLabel.textColor = [UIColor redColor];
            
        }    }
    return cell;
    
    
    
    
    
}
#pragma mark--- tableViewDelegate 有几个区
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 3;
    
}
#pragma mark--- tableViewDelegat 点击方法

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:YES];

    
    if (indexPath.section == 0 )
    {
        
        if (indexPath.row == 0)
        {
            
            
            
        }
        else if(indexPath.row ==1)
        {
            

            
            
            
            
            
        }
        else if (indexPath.row ==2)
        {
            
            
            
            
            
            
            
        }
        else
        {
            
        }
        
        
    }
    
    if (indexPath.section ==1) {
        if (indexPath.row == 1) {
            
            
            
        }else if (indexPath.row == 2) {
            
            
            
            
        }
    }
    
    
    
    
    if (indexPath.section ==2) {
        if (indexPath.row == 1) {
            
                       
            
            
            
        }
    }
    
    
    
    
    
}

@end
